#ifndef _E_GAME_H_
#define _E_GAME_H_

#include "EEntityManager.h"
#include "ESceneManager.h"

#include "eH.h"
namespace engine 
{
class ECharacter;

class EGame
{
  friend class EEntity;
  
  EGameTime           m_gameTime;
  ECharacter*         m_pPlayerCharacter;
  bool                m_bGameStarted;
public:
  EGame();
  ~EGame();
  bool                update              ( float fTimeSinceLastFrame );
  bool                startGame           ();
  bool                endGame             ();
  inline void         setPlayerCharacter  ( ECharacter* pCharacter ){ m_pPlayerCharacter = pCharacter;}
  inline ECharacter*  getPlayerCharacter  ( ) const { return m_pPlayerCharacter; }

  EScene*             createScene         ( const string& sName, const ESceneDesc& sceneDesc);
  void                destroyScene        ( const string& sName );
  bool                setCurrentScene     ( const string& sName );

  ESceneManager      m_sceneManager;
};

extern EGame* g_pGame;

} // end namespace

#endif